home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: operator % - compiler error
- Date: 18 Mar 1996 18:21:39 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4ikumj$7ub@solutions.solon.com>
- References: <4ihuuh$6ul@hatathli.csulb.edu> <DoH503.Hu7@iquest.net>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <DoH503.Hu7@iquest.net>, Doug Miller <dlmiller@iquest.net> wrote:
- >+x=663608941*y%pow(2,32) /*I want remainder*/
-
- >Hard to say for sure what caused the error, as you have not posted the
- >declarations of x and y.
-
- Nonsense; % is not defined on doubles, like the return from pow.
-
- >But here are some suggestions. Remember that * is the indirection operator,
- >as well as the
- >multiplication operator; try putting spaces before and after the * so the
- >compiler knows what
- >you mean.
-
- This is, no offense, stupid and meaningless. It has nothing to do
- with anything. The spaces *CANNOT* disambiguate, because there are
- no cases in which it is ambiguous whether a * is a multiply or
- dereference operator.
-
- Please take the time to learn the language, *THEN* post answers.
-
- >Do the same with the % operator. And remember you need a
- >semicolon at the end of your statement.
-
- The % operator likewise doesn't care about spaces. But yes, semicolons
- help.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-